#ifndef POOL_H
#define POOL_H

#include <vector>
#include <string>

#include <graphics.h>

#include "../MyTetrisNamespace.h"
#include "Block.h"

MY_TETRIS_NAMESPACE_BEGIN
static int MAX_POOL_HEIGHT = 60;

static int MAX_POOL_WIDTH = 30;

static const int WALL_CODE = 0x3f3f3f3f;

class Pool
{
private:
	std::vector<std::vector<int>> pool_shape;
	int pool_height;
	int pool_width;
	int pool_margin;
	IMAGE background;
	IMAGE wall;
public:
	Pool() = default;
	Pool(const int& pool_height, const int& pool_width, const int& pool_margin, const std::string& background_path = "", const std::string& wall_path = "");
public:
	int getPoolWidth()const;
	int getPoolHeight()const;
	int getPoolMargin()const;
	std::vector<std::vector<int>> getPoolShape()const;
	void landBlockInPool(const int& i, const int& j, const int& skin);
	void overlapLineWithNewLine(const int& i, const int& j);
public:
	void draw(const int& x = 0, const int& y = 0);
};
MY_TETRIS_NAMESPACE_END

#endif
